package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalTime;

/**
 * 预约设置
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_car_park_appointment_set")
public class CarParkAppointmentSet extends Model<CarParkAppointmentSet> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "p_id", type = IdType.ASSIGN_ID)
    private String pId;
    /**
     * 预约时长
     */
    @TableField("time")
    private Integer time;
    /**
     * 预约金额
     */
    @TableField("amount")
    private BigDecimal amount;
    /**
     * 预约开始时间
     */
    @TableField("begin_time")
    private LocalTime beginTime;
    /**
     * 预约结束时间
     */
    @TableField("end_time")
    private LocalTime endTime;
    /**
     * 预约车位数量
     */
    @TableField("num")
    private Integer num;

    public void freeData() {
        this.pId = null;
        this.time = null;
        this.amount = null;
        this.beginTime = null;
        this.endTime = null;
        this.num = null;
    }

}
